package IC.SEMANTIC;

public class SemanticWarning {

	private int line = -1; // line number
	private String message; // error message
	
    public SemanticWarning(String warningMessage) {
    	message = warningMessage;
    }
    
    public SemanticWarning(int warningLine, String warningMessage) {
        line = warningLine+1;
        message = warningMessage;
       }
    public String toString() {
    	if (line < 0)
    		return "Semantic Warning: " + message;
    	else
    		return this.line + ": " + "Semantic Warning: " + message;
    }

}
